package com.lengdanran;

import com.lengdanran.service.UserService;
import com.spring.MyApplicationContext;

import java.io.IOException;
import java.lang.reflect.InvocationTargetException;

/**
 * @Classname Test
 * @Description TODO
 * @Date 2021/6/27 22:30
 * @Created by ASUS
 */
public class Test {

    public static void main(String[] args) throws IOException, InvocationTargetException, NoSuchMethodException, InstantiationException, IllegalAccessException {
        MyApplicationContext applicationContext = new MyApplicationContext(AppConfig.class);
        UserService userService = (UserService) applicationContext.getBean("userService");
        userService.test();
        System.out.println(applicationContext.getBean("orderService"));
    }
}
